#pragma once

#include <QtWidgets/QMainWindow>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include "ui_platform.h"
#include "ui_answer.h"
#include "ui_login.h"
#include "ui_createQuestion.h"
#include "common.h"
#include "data.h"

class platform : public QMainWindow
{
	Q_OBJECT
public:
	platform(QWidget *parent = Q_NULLPTR);
	void fillList();
	void setUpMyPage();
private slots:
	void gotoQuestion(QListWidgetItem* item);
	void gotoQuestionFromFocus(QListWidgetItem* item);
	void userLogout();
	void createQuestion();
private:
	
	Ui::platformClass ui;
};

class questionWindow : public QDialog {
	Q_OBJECT
public:
	questionWindow(QWidget* parent);
	void setupWindow(int rows);
	void setupWindowByFocus(int rows);
	Ui::Form ui;
public slots:
	void fillListByTime();

signals:
	void refreshFocusList();

private slots:
	//void gotoAnswer(QListWidgetItem* item);
	
	void fillListByPrise();
	void closeWindow();
	void focus();

private:
	

};

class loginWindow : public QDialog {
	Q_OBJECT
public:
	loginWindow(QWidget* parent);
private slots:

	void userLogin();
	//void cancel();
	void signUp();
private:
	Ui::loginForm ui;
};

class createQuestionWindow :public QDialog {
	Q_OBJECT
public:
	createQuestionWindow(QWidget* parent);
private slots:
	void createAnQuestion();
private:
	Ui::createQuestion ui;
};
